﻿<Window x:Class="DetiInteract.Guide.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
		xmlns:deti="clr-namespace:DetiInteract.Guide.Controls"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:local="clr-namespace:DetiInteract.Guide.Controls"
		mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920"
        Title="MainView"
		WindowStyle="None" 
		WindowState="Maximized">

	<!-- Load Styling from Styles.xaml -->
	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/Resources/Styles.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Window.Resources>

	<Grid>
		<!-- Page Title Background -->
		<Rectangle Height="76" 
				   Margin="10,10,10,0" 
				   Stroke="#00000000" 
				   VerticalAlignment="Top"
				   HorizontalAlignment="Stretch">
			<Rectangle.Fill>
				<LinearGradientBrush StartPoint="0,0" 
									 EndPoint="0,1">
					<GradientStop Offset="1" 
								  Color="OliveDrab" />
					<GradientStop Offset="0"
								  Color="GreenYellow" />
				</LinearGradientBrush>
			</Rectangle.Fill>
			<Rectangle.Effect>
				<DropShadowEffect ShadowDepth="1" 
								  BlurRadius="10"/>
			</Rectangle.Effect>
		</Rectangle>
		
		<TextBlock Text="DETI Interact" 
				   Padding="4" 
				   Margin="15,10,0,0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Top" 
				   FontSize="48" 
				   FontFamily="Fonts/SegoeWP.ttf#Segoe WP" />
		
		<TextBlock Text="{Binding Date}" 
				   Margin="0,50,15,0" 
				   VerticalAlignment="Top" 
				   HorizontalAlignment="Right" 
				   FontSize="16" 
				   FontFamily="Fonts/SegoeWP.ttf#Segoe WP"/>
		
		<TextBlock Text="{Binding Time}" 
				   Margin="0,20,15,0" 
				   VerticalAlignment="Top" 
				   HorizontalAlignment="Right" 
				   FontSize="24" 
				   FontFamily="Fonts/SegoeWP.ttf#Segoe WP"/>

		<!-- Content Background -->
		<Rectangle Fill="WhiteSmoke" 
				   Stroke="#00000000" 
				   Margin="10,100,10,10">
			<Rectangle.Effect>
				<DropShadowEffect ShadowDepth="1" 
								  BlurRadius="10"/>
			</Rectangle.Effect>
		</Rectangle>

		<!-- Content -->
		<ListBox Margin="10,100,10,10" 
				 Padding="-2" 
				 ItemsSource="{Binding DetiControls}" 
				 BorderBrush="Transparent" 
				 ScrollViewer.HorizontalScrollBarVisibility="Hidden" 
				 ScrollViewer.VerticalScrollBarVisibility="Hidden" >
			<ListBox.ItemContainerStyle>
				<!-- Customize listbox style -->
				<Style TargetType="ListBoxItem">
					<!-- Remove padding on each item -->
					<Setter Property="Padding" 
							Value="0"/>
					<!-- Set selection highlight color to transparent -->
					<Style.Resources>
						<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" 
										 Color="Transparent"/>
					</Style.Resources>
				</Style>
			</ListBox.ItemContainerStyle>
			<ListBox.ItemsPanel>
				<ItemsPanelTemplate>
					<deti:VirtualizingWrapPanel IsItemsHost="True" 
												 HorizontalAlignment="Stretch" 
												 VerticalAlignment="Stretch" />
				</ItemsPanelTemplate>
			</ListBox.ItemsPanel>
		</ListBox>
	</Grid>
</Window>
